//related to badgeround.ui
var root = ui("$");
var nf = sm("do_Notification");
var page = sm("do_Page");
var paneler = ui("layoutNav");
var gridNav = ui("grid_view");
var listData = null;
//自定义事件---打开
root.on("popnavSJ",function(data){
	//遮罩显示
	var animMaskShow = mm("do_Animator");
	var propsMS = {bgColor:"00000044"};
	animMaskShow.append(320,propsMS,"EaseOut");
	//面板显示
	var animPanelShow = mm("do_Animator");
	var propsPS = {y:75,alpha:1};
	animPanelShow.append(320,propsPS,"EaseOut");
	
	bgmask.visible = true;
	bgmask.animate(animMaskShow);
	paneler.animate(animPanelShow);
	var listdata = mm("do_ListData");
	gridNav.bindItems(listdata);
	listdata.addData(data);
	gridNav.refreshItems();
});
//遮罩事件
var bgmask = ui("maskbg");
bgmask.on("touch","",300,function(){
	bgmaskHide();
});
root.on("popnavClose",function(data){
	bgmaskHide();
})
function bgmaskHide(){
	//遮罩隐藏
	var animMaskHide = mm("do_Animator");
	var propsMH = {bgColor:"00000000"};
	animMaskHide.append(320,propsMH,"EaseOut");
	//面板隐藏
	var animPanelHide = mm("do_Animator");
	var propsPH = {y:-180,alpha:0.8};
	animPanelHide.append(320,propsPH,"EaseOut");
	bgmask.animate(animMaskHide,function(){
		bgmask.visible = false;
	});
	paneler.animate(animPanelHide);
}